package com.enjoyor.health.HGPT.core.service;

import com.enjoyor.health.HGPT.core.entity.UserInfoMiniapp;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 小程序用户表 服务类
 * </p>
 *
 * @author enjoyor
 * @since 2023-10-18
 */
public interface IUserInfoMiniappService extends IService<UserInfoMiniapp> {

    /**
     * 根据OPEN_ID查找一条UserInfoMiniapp
     * @param openId openId
     * @return UserInfoMiniapp
     */
    public UserInfoMiniapp getUserInfoMiniappByOpenId(String openId);

    void insertOrUpdateUserInfoMiniapp(UserInfoMiniapp userInfoMiniapp);

    List<UserInfoMiniapp> getReservationUserList(String date, String period, Integer packageType);

    int updatePhoneAndUserId(String phone, String userId, String openId);

    List<UserInfoMiniapp> getByUserId(String userId);

}
